package com.dream.inspect;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.web.WebApplicationInitializer;

import com.dream.inspect.modules.filter.KYFilter;


@SpringBootApplication
@MapperScan(basePackages = {"com.dream.inspect.modules.*.dao"})//,"com.dream.inspect.modules.*.mapper"
public class AdminApplication extends SpringBootServletInitializer implements WebApplicationInitializer {

	public static void main(String[] args) {
		SpringApplication.run(AdminApplication.class, args);
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(AdminApplication.class);
	}
	
	/*@Bean
    public FilterRegistrationBean innerDataInterfaceFilterRegistration() {

        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(kYFilter());
        registration.addUrlPatterns("/*");
        registration.setName("innerDataInterfaceFilter");
        registration.setOrder(2);
        return registration;
    }

    @Bean
    public KYFilter kYFilter() {
        return new KYFilter();
    }*/
}
